home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 June: Reference Library / Dev.CD Jun 95 / Dev.CD Jun 95.toast / What's New? / New System Software Extensions / QuickDraw 3D ß / Programming / Interfaces / QD3DIO.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-12  |  20.5 KB  |  729 lines  |  [TEXT/MPS ]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        QD3DIO.h                                                 **
  4.  **                                                                          **
  5.  **                                                                             **
  6.  **     Purpose:    QuickDraw 3D IO API                                         **
  7.  **                                                                          **
  8.  **                                                                             **
  9.  **     Copyright (C) 1992-1995 Apple Computer, Inc.  All rights reserved.   **
  10.  **                                                                             **
  11.  **                                                                          **
  12.  *****************************************************************************/
  13. #ifndef QD3DIO_h
  14. #define QD3DIO_h
  15.  
  16. #if PRAGMA_ONCE
  17.     #pragma once
  18. #endif
  19.  
  20. #include "QD3DDrawContext.h"
  21. #include "QD3DView.h"
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif  /* __cplusplus */
  26.  
  27. /******************************************************************************
  28.  **                                                                          **
  29.  **                                Basic Types                                     **
  30.  **                                                                          **
  31.  *****************************************************************************/
  32.  
  33. typedef unsigned char    TQ3Uns8;    /* 1 byte unsigned integer                 */ 
  34. typedef signed   char    TQ3Int8;    /* 1 byte signed integer                 */ 
  35. typedef unsigned short    TQ3Uns16;    /* 2 byte unsigned integer                 */ 
  36. typedef signed   short    TQ3Int16;    /* 2 byte signed integer                 */ 
  37. typedef unsigned long    TQ3Uns32;    /* 4 byte unsigned integer                 */
  38. typedef signed   long    TQ3Int32;    /* 4 byte signed integer                 */
  39.  
  40. typedef struct TQ3Uns64 {
  41.     unsigned long    hi;
  42.     unsigned long     lo; 
  43. } TQ3Uns64;                            /* 8 byte unsigned integer                 */
  44.  
  45. typedef struct TQ3Int64 { 
  46.     signed long        hi; 
  47.     unsigned long    lo; 
  48. } TQ3Int64;                            /* 8 byte signed integer                 */
  49.  
  50. typedef float            TQ3Float32;    /* 4 byte floating point number             */
  51. typedef double            TQ3Float64;    /* 8 byte floating point number             */
  52.  
  53. typedef TQ3Uns32        TQ3Size;
  54.  
  55. /******************************************************************************
  56.  **                                                                          **
  57.  **                                File Types                                     **
  58.  **                                                                          **
  59.  *****************************************************************************/
  60.  
  61. typedef enum TQ3FileModeMasks {
  62.     kQ3FileModeNormal        = 0,
  63.     kQ3FileModeStream        = 1 << 0,
  64.     kQ3FileModeDatabase        = 1 << 1,
  65.     kQ3FileModeText            = 1 << 2
  66. } TQ3FileModeMasks;
  67.  
  68. typedef unsigned long TQ3FileMode;
  69.  
  70. typedef enum TQ3FileStatus {
  71.     kQ3FileStatusDone,
  72.     kQ3FileStatusRetraverse,
  73.     kQ3FileStatusError,
  74.     kQ3FileStatusCancelled
  75. } TQ3FileStatus;
  76.  
  77. /******************************************************************************
  78.  **                                                                          **
  79.  **                                Method Types                                 **
  80.  **                                                                          **
  81.  *****************************************************************************/
  82.  
  83. /*
  84.  * IO Methods
  85.  *
  86.  *    The IO system treats all objects as groups of typed information.
  87.  *
  88.  *    All objects in the metafile are made up of a "root" or parent object which
  89.  *    defines the instantiated object type.
  90.  *
  91.  *    Objects are often appended with additional child objects which append 
  92.  *    an object by appending more information, or filling out default fields.
  93.  *
  94.  *    Parents and children are encapsulated in a container object, which delimits 
  95.  *    the entire object.
  96.  *
  97.  *    Single parents have no container. Children objects may be parents and have 
  98.  *    children.
  99.  *
  100.  *    e.g.
  101.  *
  102.  *    OrderedList ()                # Single parent, no container, no children
  103.  *    Point (0 0 1)                # Single parent, no container, no children
  104.  *    Container (                    # Contained parent object, has children
  105.  *        GeometryAttributeSet ()    # Parent or "root" object (1)
  106.  *        DiffuseColor (1 0 0)    # Child object
  107.  *        SpecularControl (0.5)    # Child object
  108.  *    )
  109.  *    Container (                    
  110.  *        Point (0 0 1)            # Parent object, contained, has children
  111.  *        Container (                # Contained child object, has children
  112.  *            GeometryAttributeSet ()    # Child of "Point", also Parent object (2)
  113.  *            DiffuseColor (0 1 0)    # Child object
  114.  *        )
  115.  *    )
  116.  *    EndGroup ()
  117.  *
  118.  *    Many object types may either be parent objects, or may be a child object of
  119.  *    another parent, or may be both.
  120.  *    In the example above,
  121.  *        the DiffuseColor is solely a child object
  122.  *        the Point is solely a parent object
  123.  *        the GeometryAttributeSet is both a parent object (1), then a child 
  124.  *        object (2).
  125.  *
  126.  *    For example,
  127.  *    - a "GeometryAttributeSet" is a parent object and may also be the child 
  128.  *        object of certain geometries.
  129.  *    - a "DiffuseColor" is only a child object.
  130.  *    - a "View" is only a parent object.
  131.  *
  132.  *    Writing is straightforward: an object writes itself and any other objects 
  133.  *    that make it up.
  134.  *
  135.  *    The TQ3ObjectTraverseMethod method first calculates an object's required 
  136.  *    size on disk, and writes the parent object data.
  137.  *
  138.  *    The traverse method may then call other traverse methods to write out 
  139.  *    multiple objects bundled together in a container.
  140.  *
  141.  *    The TQ3ObjectWriteMethod method physically writes the root object data of 
  142.  *    this object to the file.
  143.  *
  144.  *    Reading is somewhat more complicated: either a parent object must know 
  145.  *    how to attach a child object to itself, or the child must know how to 
  146.  *    attach itself to its parent. Some FILE objects are not actaully "objects" 
  147.  *    in memory, such as "elements" of a set.
  148.  *
  149.  *    These object register an TQ3ObjectReadData method, in which it is passed 
  150.  *    either a pointer to a buffer to read into, or an object to attach its data 
  151.  *    to.
  152.  * 
  153.  *    Some children are ALWAYS children, meaning they always have a parent.
  154.  *    Some children may have children of their own.
  155.  *
  156.  *    The TQ3ObjectReadMethod method reads the root object data of an object from 
  157.  *    the file, creates an instance of this object, placing it in the object 
  158.  *    return value.
  159.  *
  160.  *    The TQ3ObjectReadMethod method may register a means of attaching a child 
  161.  *    object to it.
  162.  *
  163.  *    If the child object is encountered, the file system uses the registered 
  164.  *    information to read the child object. The parent, in this case, is attaching 
  165.  *    the child to itself. The child's TQ3ReadObjectMethod is called if it is 
  166.  *    encountered.
  167.  *
  168.  *    Otherwise, if the parent read method doesn't register a means of attaching 
  169.  *    the child, and the subobject is an instantiable object, the object is read, 
  170.  *    and the child's "attach" method is called to attach the child to the parent.
  171.  *
  172.  *    If the subobject is not instantiable, and the parent did not register a 
  173.  *    means of attachment, the child object's readData call is called, the the 
  174.  *    parent, and a NULL data pointer.
  175.  *
  176.  *    The TQ3ObjectAttachMethod simply determines if the child object (which was 
  177.  *    either "just read" or was referenced elsewhere) should attach the child 
  178.  *    to the parent, and does so. If this method cannot attach the two objects, 
  179.  *    it should return kQ3Failure.
  180.  *
  181.  *    So, in the incestuous world of objects, the parents may choose whatever 
  182.  *    objects they wish as children (assuming they know how the child is 
  183.  *    read, of course), or, the children may decide who they would like to have 
  184.  *    as parents (assuming they know how to attach themselves to the parent, 
  185.  *    of course).
  186.  *
  187.  *    The important lesson is: The parent always wins. The parent attachment 
  188.  *    always overrides a child's attachment.
  189.  *
  190.  */
  191. typedef TQ3Status (*TQ3ObjectTraverseMethod)(
  192.     TQ3Object            object,
  193.     TQ3FileObject        file);
  194.  
  195. typedef TQ3Status (*TQ3ObjectWriteMethod)(
  196.     const void            *object,
  197.     TQ3FileObject        file);
  198.  
  199. typedef TQ3Status (*TQ3ObjectReadMethod)(
  200.     TQ3Object            *object,
  201.     TQ3FileObject        file);
  202.  
  203. /* TQ3ObjectReadDataMethod
  204.  
  205.    For "elements" (meaning "attributes", too), you must allocate stack space and call 
  206.     Q3Set_Add on "parentObject", which is an TQ3SetObject.
  207.  
  208.     Otherwise, parentObject is an object to attach your custom data to.
  209. */
  210.  
  211. typedef TQ3Status (*TQ3ObjectReadDataMethod)(
  212.     TQ3Object            parentObject,
  213.     TQ3FileObject        file);
  214.  
  215. typedef TQ3Status (*TQ3ObjectAttachMethod)(
  216.     TQ3Object            childObject,
  217.     TQ3Object            parentObject);
  218.  
  219. typedef unsigned long    TQ3FileVersion;
  220.  
  221. #define kQ3OldVersion                    Q3FileVersion(0,2)
  222. #define kQ3CurrentVersion                Q3FileVersion(0,5)
  223.  
  224. /******************************************************************************
  225.  **                                                                             **
  226.  **                                Version Macros                                 **
  227.  **                                                                             **
  228.  *****************************************************************************/
  229.  
  230. #define Q3FileVersion(majorVersion, minorVersion)    (TQ3FileVersion) \
  231.     ((((TQ3Uns32) majorVersion & 0xFFFF) << 16) | ((TQ3Uns32) minorVersion & 0xFFFF))
  232.  
  233. /******************************************************************************
  234.  **                                                                             **
  235.  **                            String Constants                                 **
  236.  **                                                                             **
  237.  *****************************************************************************/
  238.  
  239. #define kQ3StringMaximumLength            1024
  240.  
  241. /******************************************************************************
  242.  **                                                                             **
  243.  **                            File Routines                                     **
  244.  **                                                                             **
  245.  *****************************************************************************/
  246.  
  247. /*
  248.  * Creation and accessors
  249.  */
  250. EXPORT TQ3FileObject Q3File_New(
  251.     void);
  252.  
  253. EXPORT TQ3Status Q3File_GetStorage(
  254.     TQ3FileObject        file,
  255.     TQ3StorageObject    *storage);
  256.  
  257. EXPORT TQ3Status Q3File_SetStorage(
  258.     TQ3FileObject        file,
  259.     TQ3StorageObject    storage);
  260.  
  261. /*
  262.  * Opening, and accessing "open" state, closing/cancelling
  263.  */
  264. EXPORT TQ3Status Q3File_OpenRead(
  265.     TQ3FileObject        file,
  266.     TQ3FileMode            *mode);
  267.  
  268. EXPORT TQ3Status Q3File_OpenWrite(
  269.     TQ3FileObject        file,
  270.     TQ3FileMode            mode);
  271.  
  272. EXPORT TQ3Status Q3File_IsOpen(
  273.     TQ3FileObject        file,
  274.     TQ3Boolean            *isOpen);
  275.  
  276. EXPORT TQ3Status Q3File_GetMode(
  277.     TQ3FileObject        file,
  278.     TQ3FileMode            *mode);
  279.  
  280. EXPORT TQ3Status Q3File_GetVersion(
  281.     TQ3FileObject        file,
  282.     TQ3FileVersion        *version);
  283.  
  284. EXPORT TQ3Status Q3File_Close(
  285.     TQ3FileObject        file);
  286.  
  287. EXPORT TQ3Status Q3File_Cancel(
  288.     TQ3FileObject        file);
  289.  
  290. /*
  291.  * Writing (Application)
  292.  */
  293. EXPORT TQ3Status Q3View_StartWriting(
  294.     TQ3ViewObject         view,
  295.     TQ3FileObject        file);
  296.  
  297. EXPORT TQ3ViewStatus Q3View_EndWriting(
  298.     TQ3ViewObject         view);
  299.  
  300. /*
  301.  * Reading (Application)
  302.  */
  303. EXPORT TQ3Status Q3File_GetNextObjectType(
  304.     TQ3FileObject        file,
  305.     TQ3ObjectType        *type);
  306.  
  307. EXPORT TQ3Status Q3File_ReadObject(
  308.     TQ3FileObject        file,
  309.     TQ3Object            *object);
  310.  
  311. EXPORT TQ3Status Q3File_SkipObject(
  312.     TQ3FileObject        file);
  313.  
  314. EXPORT TQ3Status Q3File_IsEndOfFile(
  315.     TQ3FileObject        file,
  316.     TQ3Boolean            *isEOF);
  317.  
  318. /*
  319.  * Idling
  320.  */
  321. typedef void (*TQ3FileIdleMethod)(
  322.     TQ3FileObject        file,
  323.     const void            *idlerData);
  324.  
  325. EXPORT TQ3Status Q3File_SetIdleMethod(
  326.     TQ3FileObject        file,
  327.     TQ3FileIdleMethod    idle,
  328.     const void            *idleData);
  329.  
  330. /*
  331.  * Custom object writing (for use in appending subobjects)
  332.  */
  333. EXPORT TQ3Status Q3FileWriteState_SetObjectWriteData(
  334.     TQ3FileObject        file,
  335.     const void            *data,
  336.     TQ3Size                size);
  337.  
  338. EXPORT TQ3Status Q3FileWriteState_TraverseSubObject(
  339.     TQ3FileObject        file,
  340.     TQ3Object            subObject);
  341.  
  342. /*
  343.  * Custom object reading (for use in reading/parsing subobjects)
  344.  */
  345. EXPORT TQ3Status Q3FileReadState_SubObjectsRemain(
  346.     TQ3FileObject        file,
  347.     TQ3Boolean            *subObjectsRemain);
  348.  
  349. TQ3Status Q3FileReadState_AddSubObjectFilter(
  350.     TQ3FileObject        file,
  351.     TQ3ObjectType        subObjectIsType);
  352.  
  353. EXPORT TQ3Status Q3FileReadState_ReadSubObject(
  354.     TQ3FileObject        file,
  355.     TQ3ObjectType        *subObjectIsType,
  356.     TQ3Object            *object);
  357.  
  358. /******************************************************************************
  359.  **                                                                             **
  360.  **                            Primitives routines                                 **
  361.  **                                                                             **
  362.  *****************************************************************************/
  363.  
  364. EXPORT TQ3Status Q3Uns8_Read(
  365.     TQ3Uns8                *data,
  366.     TQ3FileObject        file);
  367.  
  368. EXPORT TQ3Status Q3Uns8_Write(
  369.     const TQ3Uns8        data,
  370.     TQ3FileObject        file);
  371.  
  372. EXPORT TQ3Status Q3Uns16_Read(
  373.     TQ3Uns16                *data,
  374.     TQ3FileObject        file);
  375.  
  376. EXPORT TQ3Status Q3Uns16_Write(
  377.     const TQ3Uns16        data,
  378.     TQ3FileObject        file);
  379.  
  380. EXPORT TQ3Status Q3Uns32_Read(
  381.     TQ3Uns32                *data,
  382.     TQ3FileObject        file);
  383.         
  384. EXPORT TQ3Status Q3Uns32_Write(
  385.     const TQ3Uns32        data,
  386.     TQ3FileObject        file);
  387.  
  388. EXPORT TQ3Status Q3Int32_Read(
  389.     TQ3Int32            *data,
  390.     TQ3FileObject        file);
  391.             
  392. EXPORT TQ3Status Q3Int32_Write(
  393.     const TQ3Int32        data,
  394.     TQ3FileObject        file);
  395.             
  396. EXPORT TQ3Status Q3Uns64_Read(
  397.     TQ3Uns64            *data,
  398.     TQ3FileObject        file);
  399.         
  400. EXPORT TQ3Status Q3Uns64_Write(
  401.     const TQ3Uns64        data,
  402.     TQ3FileObject        file);
  403.  
  404. EXPORT TQ3Status Q3Float32_Read(
  405.     TQ3Float32            *data,
  406.     TQ3FileObject        file);
  407.  
  408. EXPORT TQ3Status Q3Float32_Write(
  409.     const TQ3Float32    data,
  410.     TQ3FileObject        file);
  411.  
  412. EXPORT TQ3Status Q3Float64_Read(
  413.     TQ3Float64            *data,
  414.     TQ3FileObject        file);
  415.  
  416. EXPORT TQ3Status Q3Float64_Write(
  417.     const TQ3Float64    data,
  418.     TQ3FileObject        file);
  419.  
  420. EXPORT TQ3Size Q3Size_Pad(
  421.     TQ3Size                size);
  422.  
  423. /*
  424.  * Pass a pointer to a buffer of kQ3StringMaximumLength bytes
  425.  */
  426. EXPORT TQ3Status Q3String_Read(
  427.     char                *data,
  428.     unsigned long        *length,
  429.     TQ3FileObject        file);
  430.  
  431. EXPORT TQ3Status Q3String_Write(
  432.     const char            *data,
  433.     TQ3FileObject        file);
  434.  
  435. /* 
  436.  * This call will read Q3Size_Pad(size) bytes,
  437.  *    but only place size bytes into data.
  438.  */
  439. EXPORT TQ3Status Q3RawData_Read(
  440.     unsigned char        *data,
  441.     unsigned long        size,
  442.     TQ3FileObject        file);
  443.  
  444. /* 
  445.  * This call will write Q3Size_Pad(size) bytes,
  446.  *    adding 0's to pad to the nearest 4 byte boundary.
  447.  */
  448. EXPORT TQ3Status Q3RawData_Write(
  449.     const unsigned char    *data,
  450.     unsigned long        size,
  451.     TQ3FileObject        file);
  452.  
  453. /******************************************************************************
  454.  **                                                                             **
  455.  **                        Convenient Primitives routines                         **
  456.  **                                                                             **
  457.  *****************************************************************************/
  458.  
  459. EXPORT TQ3Status Q3Point2D_Read(
  460.     TQ3Point2D                    *point2D,
  461.     TQ3FileObject                file);
  462.  
  463. EXPORT TQ3Status Q3Point2D_Write(
  464.     const TQ3Point2D            *point2D,
  465.     TQ3FileObject                file);
  466.  
  467. EXPORT TQ3Status Q3Point3D_Read(
  468.     TQ3Point3D                    *point3D,
  469.     TQ3FileObject                file);
  470.  
  471. EXPORT TQ3Status Q3Point3D_Write(
  472.     const TQ3Point3D            *point3D,
  473.     TQ3FileObject                file);
  474.     
  475. EXPORT TQ3Status Q3RationalPoint3D_Read(
  476.     TQ3RationalPoint3D            *point3D,
  477.     TQ3FileObject                file);
  478.  
  479. EXPORT TQ3Status Q3RationalPoint3D_Write(
  480.     const TQ3RationalPoint3D    *point3D,
  481.     TQ3FileObject                file);
  482.  
  483. EXPORT TQ3Status Q3RationalPoint4D_Read(
  484.     TQ3RationalPoint4D            *point4D,
  485.     TQ3FileObject                file);
  486.  
  487. EXPORT TQ3Status Q3RationalPoint4D_Write(
  488.     const TQ3RationalPoint4D    *point4D,
  489.     TQ3FileObject                file);
  490.  
  491. EXPORT TQ3Status Q3Vector2D_Read(
  492.     TQ3Vector2D                    *vector2D,
  493.     TQ3FileObject                file);
  494.  
  495. EXPORT TQ3Status Q3Vector2D_Write(
  496.     const TQ3Vector2D            *vector2D,
  497.     TQ3FileObject                file);
  498.  
  499. EXPORT TQ3Status Q3Vector3D_Read(
  500.     TQ3Vector3D                    *vector3D,
  501.     TQ3FileObject                file);
  502.  
  503. EXPORT TQ3Status Q3Vector3D_Write(
  504.     const TQ3Vector3D            *vector3D,
  505.     TQ3FileObject                file);
  506.  
  507. EXPORT TQ3Status Q3Matrix4x4_Read(
  508.     TQ3Matrix4x4                *matrix4x4,
  509.     TQ3FileObject                file);
  510.  
  511. EXPORT TQ3Status Q3Matrix4x4_Write(
  512.     const TQ3Matrix4x4            *matrix4x4,
  513.     TQ3FileObject                file);
  514.  
  515. EXPORT TQ3Status Q3Tangent2D_Read(
  516.     TQ3Tangent2D                *tangent2D,
  517.     TQ3FileObject                file);
  518.  
  519. EXPORT TQ3Status Q3Tangent2D_Write(
  520.     const TQ3Tangent2D            *tangent2D,
  521.     TQ3FileObject                file);
  522.  
  523. EXPORT TQ3Status Q3Tangent3D_Read(
  524.     TQ3Tangent3D                *tangent3D,
  525.     TQ3FileObject                file);
  526.  
  527. EXPORT TQ3Status Q3Tangent3D_Write(
  528.     const TQ3Tangent3D            *tangent3D,
  529.     TQ3FileObject                file);
  530.  
  531. /*    This call affects only text Files - it is a no-op in binary files */
  532.  
  533. EXPORT TQ3Status Q3Comment_Write(
  534.     char                        *comment,
  535.     TQ3FileObject                file);
  536.  
  537. /******************************************************************************
  538.  **                                                                             **
  539.  **                            Unknown Object                                      **
  540.  **                                                                             **
  541.  **        Unknown objects are generated when reading files which contain         **    
  542.  **        custom data which has not been registered in the current             **
  543.  **        instantiation of QuickDraw 3D.                                         **
  544.  **                                                                             **
  545.  *****************************************************************************/
  546.  
  547. /******************************************************************************
  548.  **                                                                             **
  549.  **                            Unknown Routines                                 **
  550.  **                                                                             **
  551.  *****************************************************************************/
  552.  
  553. EXPORT TQ3ObjectType Q3Unknown_GetType(
  554.     TQ3UnknownObject        unknownObject);
  555.  
  556. EXPORT TQ3Status Q3Unknown_GetDirtyState(
  557.     TQ3UnknownObject        unknownObject,
  558.     TQ3Boolean                *isDirty);
  559.  
  560. EXPORT TQ3Status Q3Unknown_SetDirtyState(
  561.     TQ3UnknownObject        unknownObject,
  562.     TQ3Boolean                isDirty);
  563.  
  564.  
  565. /******************************************************************************
  566.  **                                                                             **
  567.  **                        Unknown Text Routines                                 **
  568.  **                                                                             **
  569.  *****************************************************************************/
  570.  
  571. typedef struct TQ3UnknownTextData {
  572.     char                    *objectName;    /* '\0' terminated */
  573.     char                    *contents;        /* '\0' terminated */
  574. } TQ3UnknownTextData;
  575.  
  576. EXPORT TQ3Status Q3UnknownText_GetData(
  577.     TQ3UnknownObject        unknownObject,
  578.     TQ3UnknownTextData        *unknownTextData);
  579.  
  580. EXPORT TQ3Status Q3UnknownText_EmptyData(
  581.     TQ3UnknownTextData        *unknownTextData);
  582.  
  583.  
  584. /******************************************************************************
  585.  **                                                                             **
  586.  **                        Unknown Binary Routines                                 **
  587.  **                                                                             **
  588.  *****************************************************************************/
  589.  
  590. typedef struct TQ3UnknownBinaryData {
  591.     TQ3ObjectType            objectType;
  592.     unsigned long            size;
  593.     char                    *contents;
  594. } TQ3UnknownBinaryData;
  595.  
  596. EXPORT TQ3Status Q3UnknownBinary_GetData(
  597.     TQ3UnknownObject            unknownObject,
  598.     TQ3UnknownBinaryData        *unknownBinaryData);
  599.  
  600. EXPORT TQ3Status Q3UnknownBinary_EmptyData(
  601.     TQ3UnknownBinaryData        *unknownBinaryData);
  602.  
  603.  
  604. /******************************************************************************
  605.  **                                                                             **
  606.  **                            ViewHints routines                                  **
  607.  **                                                                             **
  608.  **        ViewHints are an object in a metafile to give you some hints on how  **
  609.  **        to render a scene.    You may create a view with any of the objects      **
  610.  **        retrieved from it, or you can just throw it away.                     **
  611.  **                                                                             **
  612.  **        To write a view hints to a file, create a view hints object from a      **
  613.  **        view and write the view hints.                                         **
  614.  **                                                                             **
  615.  *****************************************************************************/
  616.  
  617. EXPORT TQ3SharedObject Q3ViewHints_New(
  618.     TQ3ViewObject            view);
  619.  
  620. EXPORT TQ3Status Q3ViewHints_SetRenderer(
  621.     TQ3SharedObject            viewHints,
  622.     TQ3RendererObject        renderer);
  623.  
  624. EXPORT TQ3Status Q3ViewHints_GetRenderer(
  625.     TQ3SharedObject            viewHints,
  626.     TQ3RendererObject        *renderer);
  627.  
  628. EXPORT TQ3Status Q3ViewHints_SetCamera(
  629.     TQ3SharedObject            viewHints,
  630.     TQ3CameraObject            camera);
  631.  
  632. EXPORT TQ3Status Q3ViewHints_GetCamera(
  633.     TQ3SharedObject            viewHints,
  634.     TQ3CameraObject            *camera);
  635.  
  636. EXPORT TQ3Status Q3ViewHints_SetLightGroup(
  637.     TQ3SharedObject            viewHints,
  638.     TQ3GroupObject            lightGroup);
  639.  
  640. EXPORT TQ3Status Q3ViewHints_GetLightGroup(
  641.     TQ3SharedObject            viewHints,
  642.     TQ3GroupObject            *lightGroup);
  643.  
  644. EXPORT TQ3Status Q3ViewHints_SetAttributeSet(
  645.     TQ3SharedObject            viewHints,
  646.     TQ3AttributeSet            attributeSet);
  647.  
  648. EXPORT TQ3Status Q3ViewHints_GetAttributeSet(
  649.     TQ3SharedObject            viewHints,
  650.     TQ3AttributeSet            *attributeSet);
  651.  
  652. EXPORT TQ3Status Q3ViewHints_SetDimensionsState(
  653.     TQ3SharedObject            viewHints,
  654.     TQ3Boolean                isValid);
  655.     
  656. EXPORT TQ3Status Q3ViewHints_GetDimensionsState(
  657.     TQ3SharedObject            viewHints,
  658.     TQ3Boolean                *isValid);
  659.  
  660. EXPORT TQ3Status Q3ViewHints_SetDimensions(
  661.     TQ3SharedObject            viewHints,
  662.     unsigned long            width,
  663.     unsigned long            height);
  664.  
  665. EXPORT TQ3Status Q3ViewHints_GetDimensions(
  666.     TQ3SharedObject            viewHints,
  667.     unsigned long            *width,
  668.     unsigned long            *height);
  669.  
  670. EXPORT TQ3Status Q3ViewHints_SetMaskState(
  671.     TQ3SharedObject            viewHints,
  672.     TQ3Boolean                isValid);
  673.  
  674. EXPORT TQ3Status Q3ViewHints_GetMaskState(
  675.     TQ3SharedObject            viewHints,
  676.     TQ3Boolean                *isValid);
  677.  
  678. EXPORT TQ3Status Q3ViewHints_SetMask(    
  679.     TQ3SharedObject            viewHints,
  680.     const TQ3Bitmap            *mask);
  681.  
  682. EXPORT TQ3Status Q3ViewHints_GetMask(    
  683.     TQ3SharedObject            viewHints,
  684.     TQ3Bitmap                *mask);
  685.  
  686. /* Call Q3Bitmap_Empty when done with the mask    */
  687.  
  688. EXPORT TQ3Status Q3ViewHints_SetClearImageMethod(
  689.     TQ3SharedObject                    viewHints,
  690.     TQ3DrawContextClearImageMethod    clearMethod);
  691.  
  692. EXPORT TQ3Status Q3ViewHints_GetClearImageMethod(
  693.     TQ3SharedObject                    viewHints,
  694.     TQ3DrawContextClearImageMethod    *clearMethod);
  695.  
  696. EXPORT TQ3Status Q3ViewHints_SetClearImageColor(
  697.     TQ3SharedObject            viewHints,
  698.     const TQ3ColorARGB         *color);
  699.  
  700. EXPORT TQ3Status Q3ViewHints_GetClearImageColor(
  701.     TQ3SharedObject            viewHints,
  702.     TQ3ColorARGB             *color);
  703.  
  704. #if defined(ESCHER_VER_15) && ESCHER_VER_15
  705.  
  706. EXPORT TQ3Status Q3ViewHints_SetBackgroundShader(
  707.     TQ3SharedObject            viewHints,
  708.     TQ3ShaderObject            backgroundShader);
  709.  
  710. EXPORT TQ3Status Q3ViewHints_GetBackgroundShader(
  711.     TQ3SharedObject            viewHints,
  712.     TQ3ShaderObject            *backgroundShader);
  713.  
  714. EXPORT TQ3Status Q3ViewHints_SetAtmosphericShader(
  715.     TQ3SharedObject            viewHints,
  716.     TQ3ShaderObject            atmospheric);
  717.  
  718. EXPORT TQ3Status Q3ViewHints_GetAtmosphericShader(
  719.     TQ3SharedObject            viewHints,
  720.     TQ3ShaderObject            *atmospheric);
  721.  
  722. #endif    /*  ESCHER_VER_15  */
  723.  
  724. #ifdef __cplusplus
  725. }
  726. #endif    /* __cplusplus */
  727.  
  728. #endif /* QD3DIO_h */
  729.